import request from '@/utils/request'

// 查询论文管理列表
export function listPaper(query) {
  return request({
    url: '/system/paper/list',
    method: 'get',
    params: query
  })
}

// 查询论文管理详细
export function getPaper(id) {
  return request({
    url: '/system/paper/' + id,
    method: 'get'
  })
}

// 新增论文管理
export function addPaper(data) {
  return request({
    url: '/system/paper',
    method: 'post',
    data: data
  })
}

// 修改论文管理
export function updatePaper(data) {
  return request({
    url: '/system/paper',
    method: 'put',
    data: data
  })
}

export function updateStatus(data) {
  return request({
    url: '/system/paper/status',
    method: 'put',
    data: data
  })
}

// 删除论文管理
export function delPaper(id) {
  return request({
    url: '/system/paper/' + id,
    method: 'delete'
  })
}

// 论文按部门统计
export function getPaperCountByDept(query) {
  return request({
    url: '/system/paper/dept-count',
    method: 'get',
    params: query
  })
}

// 论文按发布状态分组统计
export function getPaperCountByStatus(query) {
  return request({
    url: '/system/paper/status-count',
    method: 'get',
    params: query
  })
}


export function getPaperInfoForCard(query) {
  return request({
    url: '/system/paper/dashboard-card-info',
    method: 'get',
    params: query
  })
}

export function getPaperAnnualStats(query) {
  return request({
    url: '/system/paper/paperAnnualStats',
    method: 'get',
    params: query
  })
}
export function getPaperStatsByJournalType(query) {
  return request({
    url: '/system/paper/paperStatsByJournalType',
    method: 'get',
    params: query
  })
}
export function getPaperStatsByPublishStatus(query) {
  return request({
    url: '/system/paper/paperStatsByPublishStatus',
    method: 'get',
    params: query
  })
}

